package cn.test.learnkotlin.v1
class GInterface {

    private interface MyInterface {

        var name:String

        fun foo() {
            println("method foo")
        }

        fun bar()
    }

    private class Child : MyInterface {
        override var name ="runoob"

        override fun bar() {
            println("method bar")
        }
    }

    private fun fooInterface(){
        val child = Child()
        child.bar()
        child.foo()
        println(child.name)
    }
    private interface A1{
        fun foo(){
            print("A")}
        fun bar()
    }
    private interface B1{
        fun foo(){
            print("B")
        }
        fun bar(){
            print("b")
        }
    }
    private class C1:A1,B1{
        override fun foo() {
            println("method foo")
        }

        override fun bar() {
            println("method bar")
        }
    }
    fun main() {
        fooInterface()
    }
}

fun main() {
    GInterface().main()
}